Digital images are commonly used in several applications such as, for example, in digital still cameras (DSC), printers, scanners, etc. A digital image includes a matrix of elements, commonly referred to as a bit map. Each element of the matrix, which represents an elemental area of the image (a pixel or pel), is formed by several digital values indicating corresponding components of the pixel. Digital images are typically subjected to a compression process to increase the number of digital images which can be stored simultaneously, such as onto a memory of a digital camera. This may allow transmission of digital images to be easier and less time consuming. A compression method commonly used in standard applications is the JPEG (Joint Photographic Experts Group) algorithm, described in CCITT T.81, 1992.
In a basic JPEG algorithm, 8×8 pixel blocks are extracted from the digital image. Discrete Cosine Transform (DCT) coefficients are then calculated for the components of each block. The DCT coefficients are rounded off using corresponding quantization tables. The quantized DCT coefficients are encoded utilizing entropy coding to obtain a compressed digital image. Entropy coding may be performed by using Arithmetic encoding or by using Huffman Coding. The original digital image can be extracted later from the compressed version of the image by a decompression process.
In the process of entropy coding and the associated steps, some operations, e.g., the computation required for finding the bit-length of a DCT coefficient, may be computationally expensive. Furthermore, the check to determine whether a DCT coefficient is zero may also be expensive. This problem may be addressed by utilizing additional memory to store these values for later use. However, this approach may result in storing data that is larger than the input image that is being coded. Thus, existing encoding techniques may require additional memory usage in order to improve performance.